וַ֠יָּבֹא אֶל־גִּדְר֨וֹת הַצֹּ֤אן עַל־הַדֶּ֙רֶךְ֙ וְשָׁ֣ם מְעָרָ֔ה וַיָּבֹ֥א שָׁא֖וּל לְהָסֵ֣ךְ אֶת־רַגְלָ֑יו וְדָוִד֙ וַאֲנָשָׁ֔יו בְּיַרְכְּתֵ֥י הַמְּעָרָ֖ה יֹשְׁבִֽים׃
Ia sampai ke kandang-kandang domba di tepi jalan, dan di sana ada sebuah gua. Saul masuk ke gua itu untuk membuang hajat, sedangkan Daud dan orang-orangnya sedang duduk di bagian paling dalam gua itu.
Rashi
according to my righteousness that I did not slay him when I sliced off the skirt of his coat. [Obviously, Rashi explains verses 8-17 as referring to Israel’s departure from Egypt. Only in verse 17 does he suggest the explanation that David refers to his own experiences.]
Metzudat Zion
It is a euphemism for reliving himself as an Samuel 1:24:3 "And Saul came to relive himself." Its named this based on the way that he is sitting down and facing. To shut in and to cover his legs because of modesty.